package com.fms.gui.util.componentBuilder;

import java.util.HashMap;
import java.util.Map;

import javax.swing.JComponent;
import javax.swing.JFrame;

import com.fms.gui.util.IComponentBuilder;

public class ComponentBuilder implements IComponentBuilder
{
	private Map<String, JComponent> compMap;
	
	public ComponentBuilder()
	{
		compMap = new HashMap<String, JComponent>();
	}
	
	
	public void register(String _name, JComponent _component)
	{
		compMap.put(_name,	_component);
	}
	
	public JComponent fetch(String _name)
	{
		JComponent toReturn = null;
		if(compMap.containsKey(_name))
		{
			toReturn = compMap.get(_name);			
		}
		return toReturn;		
	}
	
	public void setOwnerFrame(JFrame _frame)
	{
		
	}
	
}
